        
        
        var animate = null;
        function transformTwice(ele,val,cssName){
            var eleProcess;
            if(ele[0].process == undefined){
                for(var p = 0;p < ele.parents().length;p++){
                    if(ele.parents()[p].process != undefined){
                        eleProcess = ele.parents()[p].process;
                        break;
                    }
                }
            }else{
                eleProcess = ele[0].process;
            }
            ele[0].style.transform = cssName + '(' + (val + (-val * 2 * eleProcess)) + 'px)';
        }
        function scrollProcess(){
            for(var e = 0;e < $('.scrollItem').length;e++){
                var windowTop = $('.scrollItem')[e].getBoundingClientRect().top;
                var itemHeight = $('.scrollItem')[e].offsetHeight;
                var widnowHeight = window.innerHeight;
                if($('.scrollItem')[e].scrollStop == "overself" && $('.scrollItem')[e].scrollStart == 'former'){
                    if(windowTop > widnowHeight){
                        $('.scrollItem')[e].process = 0;
                    }else if(windowTop <= widnowHeight && windowTop > -itemHeight){
                        $('.scrollItem')[e].process = (widnowHeight - windowTop) / (itemHeight + widnowHeight);
                    }else if(windowTop <= -itemHeight){
                        $('.scrollItem')[e].process = 1;
                    }
                }else if($('.scrollItem')[e].scrollStop.indexOf('%') >= 0 && $('.scrollItem')[e].scrollStart.indexOf('%') >= 0){
                    var scrollStop = parseFloat($('.scrollItem')[e].scrollStop);
                    var scrollStart = parseFloat($('.scrollItem')[e].scrollStart);
                    if(windowTop > scrollStart * widnowHeight / 100){
                        $('.scrollItem')[e].process = 0;
                    }else if(windowTop <= scrollStart * widnowHeight / 100 && windowTop >= scrollStop * widnowHeight / 100){
                        $('.scrollItem')[e].process = (scrollStart * widnowHeight / 100 - windowTop) / ((scrollStart - scrollStop) * widnowHeight / 100);
                    }else{
                        $('.scrollItem')[e].process = 1;
                    }
                }
            }
            exclusiveActions();
        }
        $(document).ready(function(){
            /*if(window.history.length == 1 || window.performance.navigation.type == 1){
                animateDelayCount = 2200;
            }else{
                animateDelayCount = 550;
            }*/
            var animations = [];
            for(var l = 0;l < $('.ready').length;l++){
                $('.ready')[l].ind = l;
                animations.push($('.ready')[l]);
            }
            animate = setInterval(function(){
                if(beginningDelay != null){
                    beginningDelay += 10;
                    if(beginningDelay <= animateDelayCount) return false;
                }
                if(!animations.length){
                    clearInterval(animate);
                };
                for(var r = 0;r < animations.length;r++){
                    var judgeHalf = animations[r].className.indexOf('overHalf') >= 0?true:false;
                    var ele_h = judgeHalf?0:animations[r].offsetHeight;
                    var ele_top = judgeHalf?((animations[r].offsetHeight / 2) + animations[r].offsetTop):animations[r].getBoundingClientRect().top;
                    var window_h = window.innerHeight;
                    if((ele_top >= 0 && ele_top < window_h) || (ele_top < 0 && ele_top > -ele_h)){
                            var ind = animations[r].ind;
                            $('.ready:eq(' + ind +')').addClass('frozen'); 
                            animations.splice(r,1);
                            if(!animations.length){
                                clearInterval(animate);
                            }
                    }
                }
            },10);
            
            
            for(var s = 0;s < $('.scrollItem').length;s++){
                $('.scrollItem')[s].scrollStart = $('.scrollItem:eq(' + s + ')').attr('scroll-start');
                $('.scrollItem')[s].scrollStop = $('.scrollItem:eq(' + s + ')').attr('scroll-stop');
            }
            scrollProcess();
            $(window).scroll(function(){
                scrollProcess();
            })
        }) 